﻿using System.Reflection;

namespace DYH.Extensions.DependencyInjection;

/// <summary>
/// 注入服务集合
/// </summary>
public interface IServiceCollectionHelper
{
    /// <summary>
    /// 开始注入
    /// </summary>
    void BeginInject();

    /// <summary>
    /// 添加程序集
    /// </summary>
    /// <param name="assemblies">程序集列表</param>
    /// <param name="whereExpression">筛选</param>
    IServiceCollectionHelper AddAssembly(IEnumerable<Assembly> assemblies, Func<Type, bool>? whereExpression = null);

    /// <summary>
    /// 添加类型
    /// </summary>
    /// <param name="types">类型</param>
    IServiceCollectionHelper AddTypes(IEnumerable<Type> types);
}